const _m = {
    parse: function (time) {
        // 示例解析函数，返回一个解析后的时间对象
        return new Date(time).getTime();
    }
};
 function extend(v) {
                        var m = v;
                        return v && m.mixIn(v),
                        (!m.hasOwnProperty("init") || this.init === m.init) && (m.init = function() {
                            m.$super.init.apply(this, arguments)
                        }
                        ),
                        m.init.prototype = m,
                        m.$super = this,
                        m
                    }
const pae = {
    decrypt: function(T, F, P, Y) {
                    Y = this.cfg
                        Y=extend(Y)
                    F = this._parse(F, Y.format);
                    var K = T.createDecryptor(P, Y).finalize(F.ciphertext);
                    return K
                }
};

const dataFilter = function (e) {
    var n = e,
        r = n.data;
    if (n.isEncrypt === 1) {
        var i = _m.parse(n.lastFetchTime + "000"),
            a = _m.parse(n.lastFetchTime + "000"),
            s = pae.decrypt(r.toString(), i, {
                iv: a
            }),
            c = s.toString();
        return n.data = JSON.parse(c), n;
    } else {
        return n.isEncrypt === 0 && typeof r === "string" ? (n.data = JSON.parse(r), n) : e;
    }
};

const e = {
    data: "e30=", // 这是一个空对象的 JSON 字符串
    isEncrypt: 1,
    result: 1,
    fetchTime: 0,
    loginStatus: 0,
    totalNo: 0,
    residueNum: 0,
    updatedNum: 0,
    pageNum: 0,
    pageLimit: 0,
    lastFetchTime: 1725197911369
};

console.log(dataFilter(e));
